import { Module } from '@nestjs/common';
import { MulterModule } from '@nestjs/platform-express';
import { multerOptions } from "@/config/multer.config"
import { NovelService } from './novel.service';
import { NovelController } from './novel.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BookEntity } from './entities/book.entity';
import { ChaptersEntity } from './entities/chapters.entity';

@Module({
  imports: [MulterModule.registerAsync({
    useFactory: () => multerOptions(['text/plain', 'application/json']),
  }), TypeOrmModule.forFeature([BookEntity, ChaptersEntity])],
  controllers: [NovelController],
  providers: [NovelService],
})
export class NovelModule { }
